Skip to content

Feature o1 branch#154

Merged
dhruvj07 merged 6 commits into
mainfrom
feature-o1-branch
Feb 28, 2025
Merged

Feature o1 branch#154
dhruvj07 merged 6 commits into
mainfrom
feature-o1-branch

Conversation

@dhruvj07
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @dhruvj07, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request introduces a new example script, o1-03_function-calling.py, demonstrating function calling and structured output capabilities using both OpenAI and Azure OpenAI models via the Javelin SDK. It includes examples for non-streaming and streaming function calls, as well as structured output calls for both platforms. Additionally, it showcases regular route endpoint examples for OpenAI, covering both streaming and non-streaming scenarios. The notebook openai_universal-rout.ipynb was removed.

Highlights

  • Function Calling Examples: The script provides examples of how to use function calling with OpenAI and Azure OpenAI, showcasing both streaming and non-streaming approaches.
  • Structured Output Examples: Demonstrates how to generate structured JSON output using OpenAI and Azure OpenAI models, including parsing the output.
  • Regular Route Endpoints: Includes examples for using regular route endpoints with OpenAI, showing both streaming and non-streaming calls through the Javelin client.
  • Unified Endpoint Examples: The script uses unified endpoints for OpenAI and Azure OpenAI, simplifying the integration with Javelin.
  • Argument Parsing: The script uses argparse to allow users to specify which example to run from the command line.

Changelog

  • examples/openai/o1-03_function-calling.py
    • Added a new script demonstrating function calling and structured output examples for OpenAI and Azure OpenAI.
    • Implemented non-streaming and streaming function call examples for both OpenAI and Azure OpenAI.
    • Implemented structured output call examples for both OpenAI and Azure OpenAI, including JSON parsing.
    • Added regular route endpoint examples for OpenAI, covering both streaming and non-streaming scenarios.
    • Utilized argparse to allow users to select specific examples to run.
    • Included helper function extract_json_from_markdown to extract JSON content from markdown code blocks.
  • examples/openai/openai_universal-rout.ipynb
    • Removed the notebook file.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


Trivia time!

What is the name of the model that was recently released by OpenAI, that is a multimodal model?

Click here for the answer
GPT-4o is OpenAI's new flagship multimodal model that can accept any combination of text, audio, image, and video as input and generate any combination of text, audio, image, and video outputs.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request introduces a new example file demonstrating function calling with OpenAI and Azure OpenAI, along with modifications to an existing notebook. The code appears well-structured and includes examples for both streaming and non-streaming function calls, as well as structured output calls. However, there are a few areas that could be improved for clarity and maintainability.

Summary of Findings

Merge Readiness

The code is generally well-structured and provides useful examples. However, before merging, it would be beneficial to address the minor suggestions to improve code clarity and maintainability. I am unable to directly approve this pull request, and recommend that others review and approve this code before merging.

@dhruvj07 dhruvj07 merged commit bfccecc into main Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants